x86/shadow: tidy up fragmentary page lists in multi-page shadows
authorTim Deegan <tim@xen.org>
Tue, 3 Feb 2015 10:34:12 +0000 (11:34 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 3 Feb 2015 10:34:12 +0000 (11:34 +0100)
commitc04822de14328cbfbce0305b938b81690f79d74c
tree9bd0c3fbe455173ce4aeb301b6571648072458dc
parent1663bdbe1a3e5fe41c898a67c6ac4d30730d8394
x86/shadow: tidy up fragmentary page lists in multi-page shadows

Multi-page shadows are linked together using the 'list' field.  When
those shadows are in the pinned list, the list fragments are spliced
into the pinned list; otherwise they have no associated list head.

Rework the code that handles these fragments to use the page_list
interface rather than manipulating the fields directly.  This makes
the code cleaner, and allows the 'list' field to be either the
compact pdx form or a normal list_entry.

Signed-off-by: Tim Deegan <tim@xen.org>
Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Introduce sh_terminate_list() and make it use LIST_POISON*.

Move helper array of shadow_size() into common.c.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm/shadow/common.c
xen/arch/x86/mm/shadow/multi.c
xen/arch/x86/mm/shadow/private.h
xen/include/xen/mm.h